<?php

namespace common\models\marketing;

use Yii;

/**
 * This is the model class for table "by_marketing_effect_type".
 *
 * @property int $id
 * @property string $effect_name 名称
 * @property int $project_id 所属项目
 * @property int $status 状态【-1删除、0禁用、1启用】
 * @property int $is_inhibit_delete 是否允许删除（0：正常  1：禁止删除）
 * @property int $operation_id 操作人ID【member_id】
 * @property int $created_at 添加时间
 * @property int $updated_at 更新时间
 * @property int $sort 排序（升级）
 */
class EffectType extends \common\models\BaseModel
{
    const STATUS_DELETE = -1;// 删除
    const STATUS_INVALID = 0;// 失效
    const STATUS_ENABLE = 1;// 正常

    const INHIBIT_DELETE = 0;// 正常
    const NOT_INHIBIT_DELETE = 1;// 禁止删除
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'by_marketing_effect_type';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['project_id', 'status', 'is_inhibit_delete', 'operation_id', 'created_at', 'updated_at', 'sort'], 'integer'],
            [['effect_name'], 'string', 'max' => 60],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'effect_name' => 'Effect Name',
            'project_id' => 'Project ID',
            'status' => 'Status',
            'is_inhibit_delete' => 'Is Inhibit Delete',
            'operation_id' => 'Operation ID',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
            'sort' => 'Sort',
        ];
    }
}
